We are migrating the bug tracker to github Issues. This is now the preferred way to report NASM bugs.

Self-registration is disabled due to spam issue (mail gorcunov@gmail.com or hpa@zytor.com to create an account)

Bug 3392678 - "int label" does not cause error, even for label values > 255
Summary: "int label" does not cause error, even for label values > 255
Status: OPEN
Alias: None
Product: NASM
Classification: Unclassified
Component: Assembler (show other bugs)
Version: 2.15.xx
Hardware: All All
: Medium minor
Assignee: nobody
URL:
Depends on:
Blocks:
 
Reported: 2020-06-05 12:26 PDT by E. C. Masloch
Modified: 2023-11-30 05:09 PST (History)
5 users (show)

Obtained from: Built from git using configure
Generated by: Human
Bug category: Unexpected or confusing behavior
Observed for: Invalid input
Regression: ---
Regression since:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description E. C. Masloch 2020-06-05 12:26:55 PDT
In the following test case, there are two "int" instructions. One uses a label, the other an immediate number. Only the immediate manages to generate a warning. I would like for the label to also generate a warning. I happened upon this lack of a warning by accident when I meant to change an "int 67h" instruction to a call, but only had entered the call destination label, forgetting to change the instruction.

$ cat test.asm

	times 1024 db 0
label:
	int label
	int 1024
$ nasm -v
NASM version 2.15rc5 compiled on Jun  5 2020
$ nasm test.asm -l /dev/stderr
     1                                  
     2 00000000 00<rep 400h>            	times 1024 db 0
     3                                  label:
     4 00000400 CD[00]                  	int label
test.asm:5: warning: byte data exceeds bounds [-w+number-overflow]
     5 00000402 CD00                    	int 1024
     5          ******************       warning: byte data exceeds bounds [-w+number-overflow]
$
Comment 1 E. C. Masloch 2023-11-30 05:09:19 PST
I just enabled the NASM 2.16.02 reloc-abs-byte warning as an error in my macro collection: https://hg.pushbx.org/ecm/lmacros/rev/54a8c35131aa

The lDebug, ldosboot boot.asm, ldosboot iniload.asm, instsect, and tsr sources all build fine with this change. I did test that eg "int cmd3" does trip the error as desired. So that works as a workaround to this issue.

The new warning was added as one of a class of warnings in response to my report at https://bugzilla.nasm.us/show_bug.cgi?id=3392571